//退出页面 组件
<template>
  <div>退出</div>
</template>

<script>
export default {
  layout: "blank",
  //监听中间件响应过来的数据
  middleware: async (ctx) => {
    let { status, data } = await ctx.$axios.get("/users/exit");

    if (status === 200 && data && data.code === 0) {
      location.href = "/";
    }
  },
};
</script>

<style lang="scss">
</style>